import httpRequest from '@/utils/hqqtRequest'

enum API {
	// 获用户token
	LOFIN_URL = '/admin/acl/index/login',
	// 获取用户信息
	USER_INFO_URL = '/admin/acl/index/info',
	// 退出登录
	LOGIN_OUT = '/admin/acl/index/logout'
}

// 获用户token
export const getTokenAPI = (data: Object) =>
	httpRequest({ url: API.LOFIN_URL, method: 'POST', data })

// 根据用户token获取用户相关信息
export const getUserInfoAPI = () => httpRequest({ url: API.USER_INFO_URL })

// 退出登录
export const loginOutAPI = () => httpRequest({ url: API.LOGIN_OUT, method: 'POST' })
